home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ham Radio
/
Ham Radio CD-ROM (Emerald Software) (1995).ISO
/
misc
/
gcdist
/
gcdist.doc
Wrap
Text File
|
1989-11-27
|
2KB
|
44 lines
GCDIST (Great Circle DISTance) 9/21/84
Dennis E. Persyk Barrington, Il
The BASIC program GCDIST calculates the great circle distance
between two points on the earth's surface, and the initial heading,
given the latitude and longitude coordinates of the two points. It is
useful to pilots for calculating distances, amateur radio operators for
beam headings and Mileage Plus flyers to determine their mileage award
credits.
The equations were taken from Hewlett-Packard HP-25 Applications
Programs, 00025-90011 Rev. E 7/76.
The ARCCOS function is synthesized using the IBM reccomended
formula (as given in 6025013 Appendix E. Mathmatical Functions). Some
heading calculations may result in illegal function calls as the SQR
argument can become negative. Some accuracy checks were run and
results follow. The calculations shown for BASIC were done with the /D
command line option, as suggested by John Miron, to obtain double
precision trig functions.
BASIC/HP OBK TO 3CK SFO TO TOKYO 3CK TO MRB
----------------------------------------------------------------
BASIC 16.3 nm 4460.0 nm 498.0 nm
HP 41C 16.3 nm 4460.0 nm 498.0 nm
BASIC 265 deg 325 deg 106 deg
HP 41C 265 deg 325 deg 106 deg
As an interesting (for pilots) aside on the accuracy question, it
is noted that the distance result for the OBK to 3CK calculation
differs by 0.1 nm from the NOS Airport/Facility Directory value. The
listing for 3CK shows its position as 16.4 nm and 265 degrees from OBK,
agreeing with the approach plate showing 16.4 DME OBK to the runway 26
threshold. The difference of 0.1 nm is hard to explain because the
runway threshold is nearly the most easterly point on the airport.
As noted in the program, south latitudes and east
longitudes CAN be used -- they are entered as negative values.